// 云函数入口文件
const cloud = require('wx-server-sdk')

cloud.init()
const db = cloud.database();

// 云函数入口函数
//查询已有评论
exports.main = async (event, context) => {
  const openid = cloud.getWXContext().OPENID
  var commentid = event.commentid
 return await db.collection("xiangcun_comment").orderBy("posttime","desc").where({
    commentid
  }).get()
}